<?php
namespace Admin\Controller;
use Think\Controller;
class CommntController extends Controller {
	public function  _initialize()
	{
		if(!session('lampzuo_id')){
			 $url = U('Login/index');
			 echo "<script>window.top.location.href='{$url}';</script>";
		}

		/**
         * 获取登录用户
         */
        $admin = M('admin');
        $session_id = $_SESSION['lampzuo_id'];
        $admin_list =$admin->where(array('id'=>$session_id))->field('username,img')->find();       
        $this->assign("admin_list",$admin_list);  
	}
	public  function pp($data)
	{
		echo '<hr><pre>'.print_r($data,true).'</pre></hr>';
	}
}